﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Web;
using System.Net;

using Remix;

namespace BestBuyRemixTest
{
    class Program
    {
        static void Main(string[] args)
        {
            Product p = null;
            try
            {
                Server remix = new Server("throaway.sabeni@gmail.com", "Kimchee8");
                String filter = "iphone";
                String postalcode = "94102";
                String radius = "25";
                bool tersemode = true;
                int pagenum = 0;

                // Get all Hardgoods that match "iphone" in the name attribute and
                // are in stores in the 94102 area code in a 25 mile radius.
                // When "tersemode" is true, only return a handful of information. 
                // (See method signature for details.)
                Products list = remix.GetHardGoods(filter, tersemode, pagenum, postalcode, radius);

                if (list.Count > 0) p = list[0];
            }
            catch (Exception e)
            {
            }
            Console.WriteLine("Products output:");
            Console.WriteLine();

            Console.WriteLine(p.Name);

            System.Console.WriteLine("Hit Enter to end");
            System.Console.ReadLine();

        }
    }
}
